import java.util.function.DoubleToIntFunction;

class Dog {
    String name;
    int age;
    public void eat() {
        System.out.println("狗粮");
    }
    public void sleep() {
        System.out.println("天天睡觉");
    }
}
class Phone {

    public String bradnd;//品牌
    public String type;//型号
    public double weight;//重量
    public double length;//长度

    //打游戏方法
    public void playGame() {
        System.out.println("打游戏");
    }
    //听音乐方法
    public void listenMusic() {
        System.out.println("听音乐");
    }
    //打电话方法
    public void call() {
        System.out.println("打电话");
    }
}

public class Test {
    public static void main(String[] args) {
        Dog dog1 = new Dog();
        Dog dog2 = new Dog();
        dog1.name = "旺财";
        dog2.name = "来福";
        System.out.println(dog1.name);
        System.out.println(dog2.name);
//        Dog dog = new Dog();
//        Phone phone = new Phone();
//        dog.name = "旺财";
//        dog.age = 3;
//        phone.bradnd ="苹果";
//        phone.type ="苹果13";
//        phone.weight = 1.2;
//        phone.length = 120;
//        dog.eat();
//        phone.playGame();
//        System.out.println(dog.name+" "+dog.age);
//        System.out.println(phone.bradnd+" "+phone.type+" "+phone.weight+" "+phone.length);
    }
}
